<?PHP
session_start(); 
$userid = isset($_COOKIE["gwt_userid"]) ? $_COOKIE["gwt_userid"] : "";
$zfb = isset($_COOKIE["gwt_zfb"]) ? $_COOKIE["gwt_zfb"] : "";
$phone = isset($_COOKIE["gwt_phone"]) ? $_COOKIE["gwt_phone"] : "";
$email = isset($_COOKIE["gwt_email"]) ? $_COOKIE["gwt_email"] : "";
?>

<?PHP
//error_reporting(0);
require("common/connect.php");
require '../s/comm/config.php';
include("../../public/common.php");
$mall_id=trim($_GET['mall_id']);
if ($mall_id == "")
	exit;
?>

<?PHP 
if ($userid != "")
{
	$sql = "INSERT INTO mall_recent (user_id,mall_id,time,check_unique) values($userid, $mall_id, now(),".$userid."00000".$mall_id.") ON DUPLICATE KEY UPDATE time=now()";
	mysql_query($sql);
	$res = mysql_query("select time from mall_recent where user_id=$userid order by time desc limit 6");
	if (mysql_num_rows($res) > 0)
	{
		mysql_data_seek($res, mysql_num_rows($res) - 1);
		$row=mysql_fetch_array($res);
		mysql_query("delete from mall_recent where user_id=$userid and time < '".$row["time"]."'");
	}
}
?>

<?php
if ($userid == "")	$userid = 0;	// 0表示未登录
$sql="select * from duoduo_mall where id=".$mall_id;//获取商城信息
$query=mysql_query($sql);
$mall=mysql_fetch_array($query);
if($mall['lm']=='linktech'){
    $url="http://click.linktech.cn/?m=".$mall['merchant']."&a=".MALLWZBH."&l=99999&l_cd1=0&l_cd2=1&tu=".urlencode($mall['url'])."&u_id=".$userid;
}
elseif($mall['lm']=='yiqifa'){
    $url=str_replace('&e=','&e='.$userid,$mall['yilink']);
}

?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name ="keywords" content="购物兔,购物兔返现网,购物兔省钱浏览器,聚划算返利,返现网,返利网,返利,淘宝网返利,商城返利,京东返利,淘宝网女装返利,淘宝网女鞋打折,淘宝网男装促销,淘宝网包包秒杀,淘宝化妆品赠送"/>
<meta name="Description" content="购物兔是国内最知名的购物省钱浏览器，返现最快，当天内直接到账，返现最安全，100%不漏单；无论您在淘宝网，还是京东、当当等其他商城购物，即使是促销价也能返现，实现折上再打折，真正省钱，是您网络购物省钱的首选！" />
<title><?=WEBTITLE?>返现正在带您去 <?=$mall['name']?></title>
<style> 
#wrapper{position:absolute;left:50%;top:50%;width:454px;height:85px;padding:90px 17px;margin:-132px 0 0 -244px;text-align:center;font-size:12px;background:url(template/<?=MOBAN?>/images/logo.gif) no-repeat; border:2px #CCCCCC solid;}
#loading{position:absolute;right:22px;top:30px}
#desc{height:45px;font-size:14px;font-weight:bold}
#desc big{font-size:16px;color:#f00}
#action{color:#666}
#action a{color:#f00;text-decoration:none}
#tip{position:absolute;bottom:29px;left:19px;width:454px;line-height:35px;color:#666}
iframe{display:none}
</style>
</head>
<body>
<form name="loading" style=" width:100%; height:30px; margin:0px;"> 
 <iframe src ="<?=$mall['url']?>"></iframe><div id="wrapper">
	<img id="loading" src="http://fanli.gouwutu.com/template/default/images/cps_redirecting.gif" alt="正在转向"/>
	<div id="desc"><?=WEBTITLE?>正在带您去<big><?=$mall['name']?></big>（最高返<span style='color:#BD0000;'><?=$mall['fan']?></span>），请稍等</div>
	<div id="action">如果您的浏览器没有自动跳转，请<a href="<?=$url?>">点击这里</a></div>
	<div id="tip">
<font color="#0066ff">正在转入购物网站，请稍等</font><font color="#0066ff" size="2" face="Arial">...</font><br>
<input type=text name=chart size=46 style="font-family:Arial; font-weight:bolder; color:#fe6d01; background-color:#fff; padding:0px; border-style:none;">
<input name=percent size=47 style="color:#0066ff; text-align:center; border-width:medium; border-style:none;" type="hidden">
<script>　 
var bar=0　 
var line="||"　 
var amount="||"　 
count()　 
function count(){　 
bar=bar+2　 
amount =amount + line　 
document.loading.chart.value=amount　 
document.loading.percent.value=bar+"%"　 
if (bar<99)　 
{
setTimeout("count()",10);
}　 
else　 
{
window.location='<?=$url?>';
}　 
}</script> 
　</p> 
 </div>
</div>
</form>

</body>
</html>

